window.addEventListener("load", function () {
    var tel_input = document.querySelector('.tel_input');

    var tel = /^(13[0-9]|14[5|7]|15[0|1|2|3|4|5|6|7|8|9]|18[0|1|2|3|5|6|7|8|9])\d{8}$/;
    tel_input.addEventListener("blur", function () {
        if (tel.test(tel_input.value)) {
            this.nextElementSibling.className = 'sussful';
            this.nextElementSibling.innerHTML = '<i class="errar_icon"></i> 格式正确';
        } else {
            this.nextElementSibling.className = 'errar';
            this.nextElementSibling.innerHTML = '<i class="errar_icon"></i> 格式不正确';  
        }
    });
});